package cn.yj.cgs.dba.mapper;

import cn.yj.annotation.pagehelper.annotation.StartPage;
import cn.yj.annotation.pagehelper.page.Page;
import cn.yj.cgs.dba.entity.Message;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 永健
 * @since 2021-06-16 11:27
 */
public interface MessageMapper extends BaseMapper<Message> {
    @StartPage
    List<Message> pageList(@Param("map")Map<String, Object> params, Page<Message> page);

    long noReadCount(String userCode);

    boolean toRead(@Param("userCode") String userCode,@Param("messageId") Integer messageId);

    boolean isRead(@Param("userCode") String userCode,@Param("messageId") Integer messageId);
}
